/**
 * 
 */
package com.jie.eclipse.pan.config.dp;

import com.jie.eclipse.pan.config.BasePageConfig;
import com.jie.eclipse.pan.xml.XMLNode;

/**
 * @author yanjie
 *
 */
public class SearchPanelConfig extends BasePanelConfig{
	private boolean bcustomTab = false ;//是否是自定义标签页
	private int tabSize = 2; //标签页大小
	
	public SearchPanelConfig(BasePageConfig page) {
		super(page);
		this.SetExtValue(TAG_LABLE, "查询面板");
	}
	
	@Override
	public void initPanel() {
		for (int i = 0; i < this.tabSize; i++) {
			TabConfig tabConfig = new TabConfig(this);
			if(i==0){
				tabConfig.spsv(TAG_LABLE, "基本");
			}else{
				tabConfig.spsv(TAG_LABLE, "高级");
			}
			this.addTab(tabConfig);
		}
	}
	
	@Override
	public String getNodeName() {
		return "SP";
	}
	
	@Override
	public void FillXmlNode(XMLNode spNode) {
		super.FillXmlNode(spNode);
		spNode.setNodeName(this.getNodeName());
		if(this.tabs != null){
			for (int i = 0; i < this.tabs.size(); i++) {
				TabConfig tab = this.getTabs().get(i);
				XMLNode tabNode = new XMLNode();
				tab.FillXmlNode(tabNode);
				spNode.AddNode(tabNode);
			}
		}
		
	}
}
